package com.content.tinkhuyenmai;

import java.util.List;

import com.util.VietDecode;

import net.htmlparser.jericho.CharacterReference;
import net.htmlparser.jericho.Element;
import net.htmlparser.jericho.Source;

public class Process {
	
	//ROOT URL
	public String ROOT_URL="http://tinkhuyenmai.net";
	//public String URL= ROOT_URL+ "/Product.aspx?ID=1334";
	
	private String PRODUCT_NAME="";
	//ID san pham tren trang chinh
	private String PRODUCT_ID="";
	//ma san pham
	private String PRODUCT_CODE="";
	//HINH THUC KHUYEN MAI
	private String PRODUCT_TYPE="";
	//mieu ta san pham
	private String PRODUCT_SUMMARY="";
	
	//GIA THI TRUONG
	private String PRODUCT_PRICE="";
	
	//GIAM GIA
	private String PRODUCT_PRICE_SALE="";
	
	//NGAY BAT DAU KHUYEN MAI
	private String PRODUCT_BEGIN_DATE_SALE="";
	
	//NGAY KET THUC KHUYEN MAI
	private String PRODUCT_END_DATE_SALE="";
	
	//PHAM VI KHUYEN MAI
	private String PRODUCT_DOMAIN="";
	
	//Hinh anh
	private String PRODUCT_IMG="";
	
	//YM
	private String YM="";
	//Email
	private String EMAIL="";
	//Nguoi lien he
	private String CONTACT_PEOPLE="";
	
	//dien thoai (di dong) lien he
	private String CONTACT_MOBILE="";
	//dien thoai (co dinh) lien he
	private String CONTACT_PHONE="";
	
	//dia chi lien he
	private String CONTACT_ADDRESS="";
	
	
	//content
	private String PRODUCT_CONTENT="";
	
	
	public void setProductID(String subUrl){
		try {
			int index = subUrl.indexOf("=");			
			this.PRODUCT_ID=subUrl.substring(index+1).trim();
		} catch (Exception e) {
			this.PRODUCT_ID = null;
		}
	}
	
	public String getProductId(){
		return this.PRODUCT_ID;
	}
	
	public void setProductName(Source source)
	{
		try {
			List<Element> tbl = source.getAllElements("class", "title_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <span style=" font:normal;">Tên sản phẩm :</span> Bình nóng lạnh Rossi 20l <span style=" font:normal; color:#cc9900; font-size:11px"> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String tam="";
			String productName="";
			
			//tam = Bình nóng lạnh Rossi 20l <span style=" font:normal; color:#cc9900; font-size:11px">
			tam = value.substring(value.indexOf("</span>")+7);
			
			//productName = Bình nóng lạnh Rossi 20l
			productName = tam.substring(0,tam.indexOf("<span "));
			
			this.PRODUCT_NAME = productName.trim();			
			
		} catch (Exception e) {
			this.PRODUCT_NAME = "";
		}
	}
	
	public String getProductName(){
		return this.PRODUCT_NAME;
	}
	
	public void setProductCode(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String beginTag ="Mã sản phẩm";			
			int index = value.indexOf(beginTag);
			
			if(index > 0){	
				//value=Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div>
				value = value.substring(index);
				beginTag="CC0000";
				index = value.indexOf(beginTag);
				//Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div>
				value = value.substring(index+beginTag.length()+3);
				beginTag="</span>";
				index = value.indexOf(beginTag);
				//value=Máy hút mùi Coter NH 260BK&NH 270BK
				value = value.substring(0,index);
				this.PRODUCT_CODE = value.trim();
			}else{
				this.PRODUCT_CODE="";
			}			
			
		} catch (Exception e) {
			this.PRODUCT_CODE = "";
		}
	}
	
	public String getProductCode(){
		return this.PRODUCT_CODE;
	}
	
	public void setProductType(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String beginTag ="Hình thức khuyến mãi";			
			int index = value.indexOf(beginTag);
			
			if(index > 0){	
				//value=Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onClick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div>
				value = value.substring(index);
				beginTag="CC0000";
				index = value.indexOf(beginTag);
				//Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onClick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div>
				value = value.substring(index+beginTag.length()+2);
				beginTag="</span>";
				index = value.indexOf(beginTag);
				//value=Tặng quà
				value = value.substring(0,index);
				
				VietDecode vd = new VietDecode();
				String type = vd.convert(value).trim().toLowerCase();	
				
				type=type.replace(" ", "");
				if(type.equals("tangqua")) type="1";
				else if (type.equals("giamgia")) type="2";
				else type="3";
				
				this.PRODUCT_TYPE = type;
			}else{
				this.PRODUCT_TYPE="";
			}
		} catch (Exception e) {
			this.PRODUCT_TYPE="";
		}
		
	}
	
	public String getProductType(){
		
		return this.PRODUCT_TYPE;
	}	
	
	
	public void setPrice(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String beginTag ="Giá chưa khuyến mãi";			
			int index = value.indexOf(beginTag);
			
			if(index >= 0){	
				value = value.substring(index);
				beginTag="CC0000";
				index = value.indexOf(beginTag);
				value = value.substring(index+beginTag.length()+2);
				beginTag="</span>";
				index = value.indexOf(beginTag);
				value = value.substring(0,index);
				this.PRODUCT_PRICE = value.trim();
			}else{
				this.PRODUCT_PRICE="";
			}
			
		} catch (Exception e) {
			this.PRODUCT_PRICE="";
		}		
	}
	
	public String getPrice(){
		
		return this.PRODUCT_PRICE;
	}
	
	
	public void setDomain(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "style2", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			this.PRODUCT_DOMAIN = value.trim();			
		} catch (Exception e) {
			this.PRODUCT_DOMAIN="";
		}		
	}
	
	public String getDomain(){
		
		return this.PRODUCT_DOMAIN;
	}
	
	public void setPriceSale(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String beginTag ="Giá khuyến mãi";			
			int index = value.indexOf(beginTag);
			//System.out.println("ccc:"+index);
			if(index >= 0){	
				value = value.substring(index);
				beginTag="CC0000";
				index = value.indexOf(beginTag);
				value = value.substring(index+beginTag.length()+2);
				beginTag="</span>";
				index = value.indexOf(beginTag);
				value = value.substring(0,index);
				this.PRODUCT_PRICE_SALE = value.trim();
			}else{
				this.PRODUCT_PRICE_SALE="";
			}
		} catch (Exception e) {
			this.PRODUCT_PRICE_SALE="";
		}		
	}
	
	public String getPriceSale(){		
		return this.PRODUCT_PRICE_SALE;
	}
	
	
	public void setDateSaleBegin(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String beginTag ="Thời gian khuyến mãi";			
			int index = value.indexOf(beginTag);
			//System.out.println("ccc:"+index);
			if(index >= 0){	
				value = value.substring(index);
				beginTag="CC0000";
				index = value.indexOf(beginTag);
				value = value.substring(index+beginTag.length()+2);
				beginTag="</span>";
				index = value.indexOf(beginTag);
				value = value.substring(0,index);
				this.PRODUCT_BEGIN_DATE_SALE = convertDate(value.trim().substring(0,10));
			}else{
				this.PRODUCT_BEGIN_DATE_SALE="";
			}
		} catch (Exception e) {
			this.PRODUCT_BEGIN_DATE_SALE="";
		}
		
	}
	
	
	public String getDateSaleBegin(){		
		return this.PRODUCT_BEGIN_DATE_SALE;
	}
	
	
	public void setSummary(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String beginTag ="Ghi Chú";			
			int index = value.indexOf(beginTag);
			
			if(index >= 0){	
				value = value.substring(index);				
				beginTag="CC0000";
				index = value.indexOf(beginTag);
				value = value.substring(index+beginTag.length()+2);
				
				beginTag="</span>";
				index = value.indexOf(beginTag);
				value = value.substring(0,index);
				//System.out.println(value);
				this.PRODUCT_SUMMARY = value.trim();
			}else{
				this.PRODUCT_SUMMARY="";
			}
			
		} catch (Exception e) {
			this.PRODUCT_SUMMARY="";
		}		
	}
	
	public String getSummary(){		
		return this.PRODUCT_SUMMARY;
	}
	
	public void setDateSaleEnd(Source source){
		try {
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt", false);
			Element e = (Element)tbl.get(0);
			
			//value = <div class="Box_khuvuc"><span style="text-decoration:underline;">Khu vực</span> :<strong><span class="style2">Hà Nội </span></strong></div> <div class="title_txt"><span style=" font:normal;">Tên sản phẩm :</span> Máy hút mùi Coter NH 260BK&NH 270BK <span style=" font:normal; color:#cc9900; font-size:11px">          </span> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Mã sản phẩm </div></td> <td width="65%" align="left"> <span style="color:#CC0000;">Máy hút mùi Coter NH 260BK&NH 270BK</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Hình thức khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Tặng quà</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Giá khuyến mãi </div></td> <td width="65%" align="left"><span style="color:#CC0000">Vui lòng liên hệ</span></td> </tr> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Thời gian khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">15/08/2011 ~ 15/10/2011</span></td> </tr> <div id="pnGhiChu"> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Ghi Chú</div></td> <td width="65%" align="left"><span style="color:#CC0000">Máy hút mùi Coter NH 260BK&NH 270BK,hút mùi coter giá rẻ,đại lí hút mùi chính hãng</span></td> </tr> </div> <tr> <td width="35%" align="left" valign="top"><div style="line-height:20px;">Phạm vi khuyến mãi</div></td> <td width="65%" align="left"><span style="color:#CC0000">siêu thị nội thất nhập khẩu nhà việt</span></td> </tr> </table> <!-- dialog --> <!-- // kt dialog --> <DIV class="Box_left_parent_cont_txt_BOX"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=12907' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table> </DIV> <div class="Box_left_parent_cont_img_popAdd_Favor"> <ul> <li><img align="absmiddle" src="imgs/Yahoo_ico.gif" /> <SCRIPT language="javascript"><!-- var SubjectLine="Toi da tim thay san pham tai, " +top.document.title; var BodyText='Ban co the xem san pham : '+top.location.href; var Message='<A CLASS=contact HREF="mailto:?SUBJECT='+escape(SubjectLine)+'&BODY='+escape(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; var MessageIE='<A CLASS=contact HREF="mailto:?SUBJECT='+(SubjectLine)+'&BODY='+(BodyText)+'" OnMouseOver="status=\'Envoyer cette page à vos amis\'; return true;" TITLE="Send your friends e-mail about this page">Gửi cho bạn<\/A>'; if(document.all) { document.write(MessageIE); } else { document.write(Message); } //--></SCRIPT> </li> <li> <a id="hplFacbook" href="http://www.facebook.com/sharer.php?u=http://tinkhuyenmai.net/Product.aspx?ID=12907" target="_blank"> <img align="absmiddle" src="imgs/Icon_Facebook.png" width="25px" height="25px" /> Facebook</a></li> <li><img align="absmiddle" src="imgs/Danhgia_ico.gif" /> <a href="">Đánh giá </a></li> <li class="Favour"><img align="absmiddle" src="imgs/Add_ico.gif" /> <a href="#" onclick="bookmark('http://tinkhuyenmai.net/','Tin khuyến mãi')"> Lưu Favourite</a></li> </ul> </div> 
			String value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			
			String beginTag ="Thời gian khuyến mãi";			
			int index = value.indexOf(beginTag);
			//System.out.println("ccc:"+index);
			if(index >= 0){	
				value = value.substring(index);
				beginTag="CC0000";
				index = value.indexOf(beginTag);
				value = value.substring(index+beginTag.length()+2);
				beginTag="</span>";
				index = value.indexOf(beginTag);
				value = value.substring(0,index);
				this.PRODUCT_END_DATE_SALE = convertDate(value.trim().substring(13));
			}else{
				this.PRODUCT_END_DATE_SALE="";
			}
			
		} catch (Exception e) {
			this.PRODUCT_END_DATE_SALE="";
		}
		
	}
	
	
	public String getDateSaleEnd(){		
		return this.PRODUCT_END_DATE_SALE;
	}
	
	public void setYm(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt_BOX", false);
			Element e = (Element)tbl.get(0);
			
			//value=<table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=13394' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table>
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());		
			
			int tam=0;
			tam=value.indexOf("ymsgr:sendIM?");
			
			if(tam >= 0){
				//value=sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=13394' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table>
				value=value.substring(tam+13);
				tam=value.indexOf("&");
				//value=sieuthi_noithatnhapkhau
				value = value.substring(0,tam);
				
				this.YM = value.trim();
			}else
				this.YM="";
			
		} catch (Exception e) {
			this.YM="";
		}
		
	}
	
	public String getYm(){
		return this.YM;
	}
	
	
	public void setEmail(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("class", "Box_left_parent_cont_txt_BOX", false);
			Element e = (Element)tbl.get(0);
			
			//value=<table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="45%" align="center"><strong>Người liên hệ </strong>: noithatnhaviet</td> <td width="10%" rowspan="2" align="center" valign="middle"><img src="imgs/line.png" /></td> <td width="45%" rowspan="2" align="center" valign="middle"> <a href='mailto:noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=13394' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table>
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());		
			
			int tam=0;
			tam=value.indexOf("mailto:");
			
			if(tam >= 0){
				//value=noithatnhaviet.net.vn@gmail.com' class='button orange bigrounded'><img align='absmiddle'src='imgs/mail_forward_48.png' width='16' height='16' /> Gửi mail </a><br /> <span style="font-size:9px;">Gửi 1 tin nhắn đến nhà cung cấp</span></td> </tr> <tr> <td width="45%" align="center"><a style='font-size:10px;' href='ymsgr:sendIM?sieuthi_noithatnhapkhau&m=Xin chao, toi muon hoi ve san pham http://www.tinkhuyenmai.net/Product.aspx?ID=13394' rel='nofollow'> <img src='http://opi.yahoo.com/online?u=sieuthi_noithatnhapkhau&m=g&t=2' alt='YM:sieuthi_noithatnhapkhau' border=0 width='125' height='25' /></a> </td> </tr> </table>
				value=value.substring(tam+7);
				tam=value.indexOf("'");
				//value=noithatnhaviet.net.vn@gmail.com
				value = value.substring(0,tam);
				
				this.EMAIL = value.trim();
			}else
				this.EMAIL="";
			
		} catch (Exception e) {
			this.EMAIL="";
		}		
	}
	
	
	public String getEmail(){
		return this.EMAIL;
	}
	
	
	public void setContactPeople(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("class", "Box_right_parent_center_right", false);
			Element e = (Element)tbl.get(0);
			
			//value=<DIV style=" line-height:20PX;"><strong>noithatnhaviet</strong></DIV> <DIV style=""><span style="font-size:12PX;">61 Tam Trinh - Hai Bà Trưng - HN</span></DIV> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%" align="left" valign="top"><div style="line-height:20px;">Điện thoại :</div></td> <td align="left"><span style="color:#003399;">0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());		
			//this.CONTACT_PEOPLE = value;
			
			int tam=0;
			String tagBegin="<strong>";
			String tagEnd="</strong>";
			
			tam=value.indexOf(tagBegin);
			
			if(tam >= 0){
				//value=noithatnhaviet</strong></DIV> <DIV style=""><span style="font-size:12PX;">61 Tam Trinh - Hai Bà Trưng - HN</span></DIV> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%" align="left" valign="top"><div style="line-height:20px;">Điện thoại :</div></td> <td align="left"><span style="color:#003399;">0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
				value=value.substring(tam+tagBegin.length());
				tam=value.indexOf(tagEnd);
				//value=noithatnhaviet
				value = value.substring(0,tam);
				
				this.CONTACT_PEOPLE = value.trim();
			}else
				this.CONTACT_PEOPLE="";
			
		} catch (Exception e) {
			this.CONTACT_PEOPLE="";
		}		
	}
	
	public String getContactPeople(){
		return this.CONTACT_PEOPLE;
	}
	
	
	public void setContactMobile(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("class", "Box_right_parent_center_right", false);
			Element e = (Element)tbl.get(0);
			
			//value=<DIV style=" line-height:20PX;"><strong>noithatnhaviet</strong></DIV> <DIV style=""><span style="font-size:12PX;">61 Tam Trinh - Hai Bà Trưng - HN</span></DIV> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%" align="left" valign="top"><div style="line-height:20px;">Điện thoại :</div></td> <td align="left"><span style="color:#003399;">0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());		
			//this.CONTACT_MOBILE=value;
			int tam=0;
			String tagBegin="color:#003399;";
			String tagEnd="</span>";
			
			tam=value.indexOf(tagBegin);			
			if(tam >= 0){
				//value=0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
				value=value.substring(tam+tagBegin.length()+2);
				tam=value.indexOf(tagEnd);
				//value=0439947198 - 0977109773
				value = value.substring(0,tam);
				
				tagEnd="-";
				tam=value.indexOf(tagEnd);
				//0977109773
				value = value.substring(tam+1);
				
				this.CONTACT_MOBILE = value.trim();
			}else
				this.CONTACT_MOBILE="";
			
		} catch (Exception e) {
			System.out.println(e.toString());
			this.CONTACT_MOBILE="";
		}		
	}
	
	public String getContactMobile(){
		return this.CONTACT_MOBILE;
	}
	
	
	public void setContactPhone(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("class", "Box_right_parent_center_right", false);
			Element e = (Element)tbl.get(0);
			
			//value=<DIV style=" line-height:20PX;"><strong>noithatnhaviet</strong></DIV> <DIV style=""><span style="font-size:12PX;">61 Tam Trinh - Hai Bà Trưng - HN</span></DIV> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%" align="left" valign="top"><div style="line-height:20px;">Điện thoại :</div></td> <td align="left"><span style="color:#003399;">0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());		
			//this.CONTACT_MOBILE=value;
			int tam=0;
			String tagBegin="color:#003399;";
			String tagEnd="</span>";
			
			tam=value.indexOf(tagBegin);			
			if(tam >= 0){
				//value=0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
				value=value.substring(tam+tagBegin.length()+2);
				tam=value.indexOf(tagEnd);
				//value=0439947198 - 0977109773
				value = value.substring(0,tam);
				
				tagEnd="-";
				tam=value.indexOf(tagEnd);
				//0439947198
				value = value.substring(0,tam);
				
				this.CONTACT_PHONE = value.trim();
			}else
				this.CONTACT_PHONE="";
			
		} catch (Exception e) {
			System.out.println(e.toString());
			this.CONTACT_PHONE="";
		}		
	}
	
	public String getContactPhone(){
		return this.CONTACT_PHONE;
	}
	
	public void setContactAddress(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("class", "Box_right_parent_center_right", false);
			Element e = (Element)tbl.get(0);
			
			//value=<DIV style=" line-height:20PX;"><strong>noithatnhaviet</strong></DIV> <DIV style=""><span style="font-size:12PX;">61 Tam Trinh - Hai Bà Trưng - HN</span></DIV> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%" align="left" valign="top"><div style="line-height:20px;">Điện thoại :</div></td> <td align="left"><span style="color:#003399;">0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());		
			//this.CONTACT_MOBILE=value;
			int tam=0;
			String tagBegin="font-size:12PX";
			String tagEnd="</span>";
			
			tam=value.indexOf(tagBegin);			
			if(tam >= 0){
				//value=61 Tam Trinh - Hai Bà Trưng - HN</span></DIV> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%" align="left" valign="top"><div style="line-height:20px;">Điện thoại :</div></td> <td align="left"><span style="color:#003399;">0439947198 - 0977109773</span></td> </tr> <tr> <td align="left" valign="top"><div style="line-height:20px;">Ngày tham gia :</div></td> <td align="left"><span style="color:#003399;">11/12/2010</span></td> </tr> </table>
				value=value.substring(tam+tagBegin.length()+3);
				tam=value.indexOf(tagEnd);
				//value=61 Tam Trinh - Hai Bà Trưng - HN
				value = value.substring(0,tam);
				
				this.CONTACT_ADDRESS = value.trim();
			}else
				this.CONTACT_ADDRESS="";
			
		} catch (Exception e) {
			System.out.println(e.toString());
			this.CONTACT_ADDRESS="";
		}		
	}
	
	public String getContactAddress(){
		return this.CONTACT_ADDRESS;
	}
	
	
	public void setImg(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("id", "photo_1", false);
			Element e = (Element)tbl.get(0);
			
			//value=<img src='Upload/634195416580541250_15.jpg' width='264' height='264' />
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());		
			//this.PRODUCT_IMG=value;
			int tam=0;
			String tagBegin="'";
			String tagEnd="'";
			
			tam=value.indexOf(tagBegin);			
			if(tam >= 0){
				//value=Upload/634195416580541250_15.jpg' width='264' height='264' />
				value=value.substring(tam+tagBegin.length());
				tam=value.indexOf(tagEnd);
				//value=Upload/634195416580541250_15.jpg
				value = value.substring(0,tam);
				
				this.PRODUCT_IMG = ROOT_URL+"/"+value.trim();
			}else
				this.PRODUCT_IMG="";
			
		} catch (Exception e) {
			System.out.println(e.toString());
			this.PRODUCT_IMG="";
		}		
	}
	
	public String getImg(){
		return this.PRODUCT_IMG;
	}
	
	
	
	public void setProductContent(Source source){
		try {
			String value="";
			
			List<Element> tbl = source.getAllElements("id", "tabs-1", false);
			Element e = (Element)tbl.get(0);
			
			//value=<img src='Upload/634195416580541250_15.jpg' width='264' height='264' />
			value = CharacterReference.decodeCollapseWhiteSpace(e.getContent());
			value = value.replace("/Upload/", this.ROOT_URL+"/Upload/");
			this.PRODUCT_CONTENT=value;
			
			
//			int tam=0;
//			String tagBegin="'";
//			String tagEnd="'";
//			
//			tam=value.indexOf(tagBegin);			
//			if(tam >= 0){
//				//value=Upload/634195416580541250_15.jpg' width='264' height='264' />
//				value=value.substring(tam+tagBegin.length());
//				tam=value.indexOf(tagEnd);
//				//value=Upload/634195416580541250_15.jpg
//				value = value.substring(0,tam);
//				
//				this.PRODUCT_CONTENT = ROOT_URL+"/"+value.trim();
//			}else
//				this.PRODUCT_CONTENT="";
			
		} catch (Exception e) {
			System.out.println(e.toString());
			this.PRODUCT_CONTENT="";
		}		
	}
	
	public String getProductContent(){
		return this.PRODUCT_CONTENT;
	}
	
	private String convertDate(String p_date){
		try {
			String rerult=null;
			if(p_date.length()>0){
				String[] arr = p_date.split("\\/");
				rerult = arr[2]+"-"+arr[1]+"-"+arr[0];
			}
			return rerult;
		} catch (Exception e) {
			return null;
		}
	}	
}
